const ZERO_NODE_ID: [u8; 6] = [0; 6];
pub fn now_v6() -> Result<uuid::Uuid, anyhow::Error> {
    let node_id = try_get_node_id()?;
    Ok(uuid::Uuid::now_v6(&node_id))
}

fn try_get_node_id() -> Result<[u8; 6], anyhow::Error> {
    let node_id = mac_address::get_mac_address()
        .map_err(|e| anyhow::Error::from(e))?
        .map_or(ZERO_NODE_ID.clone(), |x| x.bytes());
    Ok(node_id)
}
